package mi.payment.transaction.revoke;

import android.content.Context;
import android.content.Intent;

import java.util.List;

import mi.payment.R;
import mi.payment.db.dao.PayDetail;

/**
 * 消费撤销模块 -- 主界面
 */
public class RevokeMainActivity extends BaseRevokeListActivity {

    @Override
    public void setTitle() {
        mTitleView.setCenterText(R.string.consume_revoke);
    }

    @Override
    public List<PayDetail> getSwipeCardSourceData() {
        return mPayDetailModel.getRevocableAndRevokedList();
    }

    @Override
    public List<PayDetail> getQRCodeSourceData() {
        return mPayDetailModel.getRevocableAndRevokedListByQRCode();
    }

    @Override
    public List<PayDetail> getAllSourceData() {
        return mPayDetailModel.getAllConsumptionData();
    }

    @Override
    public boolean isPreAuthorizeCompleteRevoke() {
        return false;
    }

    @Override
    public void onSearchPressed() {
        openActivity(RevokeSearchActivity.class);
    }

    public static void startAction(Context context) {
        Intent intent = new Intent(context, RevokeMainActivity.class);
        context.startActivity(intent);
    }


}
